package com.ihrm.employee.service.impl;

import com.ihrm.domain.employee.UserCompanyJobs;
import com.ihrm.employee.mapper.UserCompanyJobsMapper;
import com.ihrm.employee.service.api.UserCompanyJobsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created with IDEA
 * Author:xzengsf
 * Date:2018/10/19 9:52
 * Description:
 */
@Service
public class UserCompanyJobsServiceImpl implements UserCompanyJobsService {

    @Autowired
    private UserCompanyJobsMapper userCompanyJobsMapper;

    public void update(UserCompanyJobs jobsInfo) {
        userCompanyJobsMapper.updateByPrimaryKeySelective(jobsInfo);
    }

    public UserCompanyJobs findById(String userId) {
        return userCompanyJobsMapper.findByPrimaryKey(userId);
    }

    @Override
    public void delete(String userId) {
        userCompanyJobsMapper.deleteByPrimaryKey(userId);
    }

    @Override
    public void insert(UserCompanyJobs jobsInfo) {
        userCompanyJobsMapper.insertSelective(jobsInfo);
    }
}
